﻿
@{
    ViewBag.Title = "汇总表";

    Layout = "~/Views/Shared/_LayoutDateUserCorS.cshtml";
}

@section SubMenu1{ 
            订单:
            <select class="form-control" id="OrderFlag" name="OrderFlag">
                <option selected="selected" value="-1">全部</option>

                @if ((int)ViewData["Flag"] == 0)
                {
                    <option value="0">采购订单</option>
                    <option value="1">采购退货单</option>
                    <option value="2">赠品入库单</option>
                }
                else
                {
                    <option value="0">销售订单</option>
                    <option value="1">销售退货单</option>
                    <option value="2">赠品出库单</option>
                    <option value="3">POS零售单</option>
                    <option value="4">POS退货单</option>
                }
            </select>
 }
 
    <script type="text/javascript">
        $(document).ready(function () {
            $($("#SearchFlag option")[1]).text("按商品筛选");
            $("#UserId").attr("disabled", "disabled");

            $(":button").click(function () {
                $.get("/Jxc/ReportH", {
                    flag: @ViewData["Flag"],
                    startDate: $("#StartDate").val(),
                    endDate: $("#EndDate").val(),
                    corsId: $("#CorSId").val(),
                    searchFlag: $("#SearchFlag").val(),
                    orderFlag: $("#OrderFlag").val()
                },
                    function (data, status) {
                        if (status == "success") {
                            $("#tableDetail").html(data);
                        }
                        else {
                            alert("远程服务器连接失败");
                        }
                    });
            });
        });
    </script> 